package com.jar.exercise.设计模式.visitor模式.user;

import com.jar.exercise.设计模式.visitor模式.visitor.Visitor;

import java.math.BigDecimal;

public class Teacher extends User{
    public Teacher(String name, String className, String identity) {
        super(name, className, identity);
    }

    @Override
    public void accept(Visitor visitor) {
        visitor.visitor(this);
    }

    public double enrollmentRate() {
        return BigDecimal.valueOf(Math.random()).setScale(2, 4).doubleValue();
    }
}
